using System;
using Microsoft.Xna.Framework;

namespace Autobot
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            VirtualRobot robotSimulation = null;
            // Three args: WindowX WindowY FileName
            if (args.Length >= 4)
            {
                robotSimulation = new VirtualRobot(new Vector2(Convert.ToSingle(args[0]), Convert.ToSingle(args[1])), args[2], args[3]);
            }
            else if (args.Length == 3)
                robotSimulation = new VirtualRobot(new Vector2(Convert.ToSingle(args[0]), Convert.ToSingle(args[1])), args[2]);
            // Two args: WindowX WindowY
            else if (args.Length == 2)
                robotSimulation = new VirtualRobot(new Vector2(Convert.ToSingle(args[0]), Convert.ToSingle(args[1])));
            else if (args.Length == 1)
                robotSimulation = new VirtualRobot(args[0]);
            else
                robotSimulation = new VirtualRobot();

            using (robotSimulation)
            {
                robotSimulation.Run();
            }
        }
    }
}

